import React from 'react';
import { Button } from '@alifd/next';
import st from './index.module.scss';

interface Props {
  onAdd: () => void;
}

const EmptyBlock: React.FunctionComponent<Props> = ({ onAdd = () => { } }): JSX.Element => {
  return (
    <div className={st.emptyBlock}>
      <img alt="data empty" className={st.resultImage} src="//img.alicdn.com/tfs/TB1_yJXFkL0gK0jSZFAXXcA9pXa-1112-758.png" />
      <div className={st.resultTitle}>
        还没有配置收货地址哦，去
        <Button text type="primary" onClick={onAdd}>设置</Button>
      </div>
    </div>
  );
};

export default EmptyBlock;
